package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.system.domain.vo.IndexSchoolRole;
import com.ruoyi.system.domain.vo.SigninVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SignupMapper;
import com.ruoyi.system.domain.Signup;
import com.ruoyi.system.service.ISignupService;

/**
 * 报名录取Service业务层处理
 * 
 * @author hyb
 * @date 2023-02-10
 */
@Service
public class SignupServiceImpl implements ISignupService 
{
    @Autowired
    private SignupMapper signupMapper;

    /**
     * 查询报名录取
     * 
     * @param id 报名录取主键
     * @return 报名录取
     */
    @Override
    public Signup selectSignupById(Long id)
    {
        return signupMapper.selectSignupById(id);
    }

    /**
     * 查询报名录取列表
     * 
     * @param signup 报名录取
     * @return 报名录取
     */
    @Override
    public List<Signup> selectSignupList(Signup signup)
    {
        return signupMapper.selectSignupList(signup);
    }

    /**
     * 新增报名录取
     * 
     * @param signup 报名录取
     * @return 结果
     */
    @Override
    public int insertSignup(Signup signup)
    {
        signup.setCreateTime(DateUtils.getNowDate());
        return signupMapper.insertSignup(signup);
    }

    /**
     * 修改报名录取
     * 
     * @param signup 报名录取
     * @return 结果
     */
    @Override
    public int updateSignup(Signup signup)
    {
        signup.setUpdateTime(DateUtils.getNowDate());
        return signupMapper.updateSignup(signup);
    }

    /**
     * 批量删除报名录取
     * 
     * @param ids 需要删除的报名录取主键
     * @return 结果
     */
    @Override
    public int deleteSignupByIds(Long[] ids)
    {
        return signupMapper.deleteSignupByIds(ids);
    }

    /**
     * 删除报名录取信息
     * 
     * @param id 报名录取主键
     * @return 结果
     */
    @Override
    public int deleteSignupById(Long id)
    {
        return signupMapper.deleteSignupById(id);
    }

    @Override
    public List<Signup> selectSignupListAndCheckActivity(Signup signup) {
        return signupMapper.selectSignupListAndCheckActivity(signup);
    }

    @Override
    public List<Signup> selectSignupByActivityId(String id) {
        return signupMapper.selectSignupByActivityId(id);
    }

    @Override
    public List<IndexSchoolRole> getSignUpByActivityId(String activityId) {
        return signupMapper.getSignUpByActivityId(activityId);
    }
}
